package com.mynovamobile.android;

import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.content.DialogInterface;

public class MNMMessage {
	public static final int ERROR = 0;
	public static final int INFO = 1;

	
	public MNMMessage(Context context, String title, String message) {
		Builder builder = new Builder(context);
		AlertDialog alertDialog = builder.create();
		alertDialog.setTitle(title);
		alertDialog.setMessage(message);
		alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, "OK",
				new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int which) {
						return;
					}
				});
		alertDialog.show();
	}
	
	public MNMMessage(Context context, String title, String message, int type) {
		Builder builder = new Builder(context);
		AlertDialog alertDialog = builder.create();
		alertDialog.setTitle(title);
		alertDialog.setMessage(message);
		
		switch (type) {
			case 0:
				alertDialog.setIcon(R.drawable.ic_dialog_alert);
				break;
			case 1:
				alertDialog.setIcon(R.drawable.ic_dialog_info);
				break;
		}
		alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, "OK",
				new DialogInterface.OnClickListener() {
					public void onClick(DialogInterface dialog, int which) {
						return;
					}
				});
		alertDialog.show();
	}
}
